package cn.stylefeng.guns.sys.modular.tao.mapper;

import cn.stylefeng.guns.sys.modular.tao.entity.Stock;
import cn.stylefeng.guns.sys.modular.tao.model.params.StockParam;
import cn.stylefeng.guns.sys.modular.tao.model.result.StockResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 库存 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2019-09-11
 */
@Repository
public interface StockMapper extends BaseMapper<Stock> {

    /**
     * 获取列表
     *
     * @author 
     * @Date 2019-09-11
     */
    List<StockResult> customList(@Param("paramCondition") StockParam paramCondition);

    /**
     * 获取map列表
     *
     * @author 
     * @Date 2019-09-11
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") StockParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 
     * @Date 2019-09-11
     */
    Page<StockResult> customPageList(@Param("page") Page page, @Param("paramCondition") StockParam paramCondition);

    Page<StockResult> customPageLists(@Param("page") Page page, @Param("paramCondition") StockParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author 
     * @Date 2019-09-11
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") StockParam paramCondition);

    StockParam getByNumId(@Param("numid") String numid);

    Integer updateByNumId(@Param("Data")StockParam stockParam);

    StockParam getByNumIdAndSku(@Param("numid") String numid, @Param("sKu") String sKu);

    StockResult getGoodsSpecsByGoodsId(@Param("id") String id);
}
